<%@ page language="java" pageEncoding="UTF-8" %>
<% 
    String context = request.getContextPath();
    request.setAttribute("context",context);
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <link href="${context}/static/jquery-easyui-1.3.2/themes/gray/easyui.css" rel="stylesheet" type="text/css" />
    <link href="${context}/static/jquery-easyui-1.3.2/themes/icon.css" rel="stylesheet" type="text/css" />
    <script src="${context}/static/jquery-easyui-1.3.2/jquery-1.8.0.min.js" type="text/javascript"></script>
    <script src="${context}/static/jquery-easyui-1.3.2/jquery.easyui.min.js" type="text/javascript"></script>
    <script src="${context}/static/jquery-easyui-1.3.2/locale/easyui-lang-zh_CN.js" type="text/javascript"></script>
    <script src="${context}/static/scripts/json2.js" type="text/javascript"></script>
    <script src="${context}/static/scripts/common.js" type="text/javascript"></script>
    <script src="${context}/static/uploadify/jquery.uploadify.min.js" type="text/javascript"></script>
    <link href="${context}/static/uploadify/uploadify.css" rel="stylesheet" type="text/css" />
    
<script type="text/javascript">
	$(function() {
		$('#file_upload').uploadify({
			'swf'      : '${context}/static/uploadify/uploadify.swf',
			'uploader' : '${context}/UploadServlet',
			"queueID": "fileQueue",
			"height": 20,
            "width": 70,
            "onError": function (evt, queueId, fileObj, errorObj) {
                alert(fileObj.name + "上传失败" + "," + errorObj.info);
            },
            "onUploadSuccess": function (file,data,response) {
            	alert(data);
				$(data).appendTo($("body"));
           }            
		});
	});
</script>     
<style type="text/css">
body {
	font: 13px Arial, Helvetica, Sans-serif;
}
</style>
</head>

<body style="margin:0px;height:100%;overflow:hidden">
   <table height="100%" width="100%" border="0" cellpadding="0" cellspacing="0" style="border-collapse:collapse">
        <tr height="99%">
            <td valign="top">
                <div id="fileQueue" name="fileQueue" style="overflow:auto;display:true"></div>
            </td>
        </tr>
        <tr height="36px">
            <td>
                <div class="dialog-button">
                    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse:collapse;float:right">
                        <tr>
                            <td align="center" valign="middle"><input type="file" id="file_upload" name="input_file"/></td>
                        </tr>
                    </table>
                    <div style="clear:both"></div>
                </div>
            </td>
        </tr>
    </table>
</body>
</html>